package com.dayuanit.dy17.spring.test;

import com.dayuanit.dy17.spring.entity.Zoo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringTest2 {
    public static void main(String[] args) {
        //第二种创建Bean对象的方法
        ApplicationContext context = new ClassPathXmlApplicationContext("spring/spring-ioc2.xml");

        Zoo zoo = context.getBean(Zoo.class);
        System.out.println(zoo);

        zoo.show();
    }
}
